<template>
  <div class="certificate">
    <div class="head flex">
      <div>
        <h6 class="middle black">我的证书</h6>
        <div>
          <span class="small bold">证书列表</span>
        </div>
      </div>
    </div>
    <div class="content">
        <ul class="flex">
            <li v-for="(item, i) in 6" :key="i">
                <div class="img-center" :style="{backgroundImage: `url(${img})`}"></div>
                <div class="flex between item-center">
                    <div>
                        <h3 class="black bold" style="line-height: 30px">优秀学员</h3>
                        <div class="small">颁发时间:2023-02-27</div>
                    </div>
                    <div>
                        <el-button type="primary" size="mini">生成</el-button>
                        <el-button type="primary" size="mini">下载</el-button>
                    </div>
                </div>
            </li>
        </ul>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            img: require('@/assets/img/info/cert.png')
        }
    }
}
</script>

<style lang="scss" scoped>
.certificate {
    padding: 10px;
    .content {
        >ul {
            flex-wrap: wrap;
            >li {
                margin-top: 15px;
                width: 23%;
                &:not(:nth-child(4n)) {
                    margin-right: calc(8% / 3);
                }
                .img-center {
                    aspect-ratio: 2/1;
                }
                >div:first-child {
                    border-radius: 5px;
                }
                >div:last-child {
                    padding: 10px 0;
                }
            }
        }
    }
}
</style>